﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpIM.Http
{
    class RequestPath
    {
        public static string CombinePaths(string[] values)
        {
            return "/" + string.Join("/", values);
        }
        public static string[] GetPaths(string path)
        {
            return path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
        }
        public static string[] GetPaths(Uri url)
        {
            var path = url.AbsolutePath;
            return path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
        }
    }
}
